plugins {
    id 'scala'
    id 'groovy'
    id 'io.gatling.gradle' version '3.11.1' // use 3.8.4 for 7+ gradle version
}

dependencies {
    implementation "org.scala-lang:scala-library:2.13.3"

    testImplementation 'org.slf4j:slf4j-api:1.7.32'
    testImplementation 'ch.qos.logback:logback-classic:1.2.10'
    testImplementation 'org.spockframework:spock-core:2.3-groovy-3.0'
    testImplementation "org.testcontainers:testcontainers:1.19.8"
    testImplementation "org.testcontainers:postgresql:1.19.8"
}

tasks.withType(ScalaCompile) {
    scalaCompileOptions.forkOptions.with {
        jvmArgs = ['-Xss100m'] // Scala compiler may require a larger stack size when compiling Gatling simulations
    }
}

tasks.named('test') {
    useJUnitPlatform()
}